import Cookies from 'js-cookie'

const TokenKey = 'vue_admin_template_token'
const TokenUrl = 'vue_admin_template_url'

export function getToken(): string {
  return Cookies.get(TokenKey)
}

export function setToken(token: any): void {
  return Cookies.set(TokenKey, token, { expires: 1 })
}

export function removeToken(): void {
  return Cookies.remove(TokenKey)
}
export function getUrl(): string {
  return Cookies.get(TokenUrl)
}

export function setUrl(url: any): void {
  return Cookies.set(TokenUrl, url, { expires: 1 })
}

export function removeUrl(): void {
  return Cookies.remove(TokenUrl)
}
